package com.service.impl;

import com.dao.VisitDAO;
import com.entity.Visit;
import com.service.VisitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("visitService") //
public class VisitServiceImpl implements VisitService {
    @Autowired // 它可以对类成员变量、方法及构造函数进行标注，完成自动装配的工作
    private VisitDAO visitDAO;

    @Override
    public int insertVisit(Visit visit) {
        return visitDAO.insertVisit(visit);
    }

    @Override
    public int deleteVisit() {
        return visitDAO.deleteVisit();
    }

    @Override
    public List<Visit> getVisitByCond(Visit visit) {
        return visitDAO.getVisitByCond(visit);
    }
}
